﻿<Page x:Class="University.Workshop.Presentation.Kardex.SearchKardex"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      Height="563" Width="780"
	Title="SearchKardex" Loaded="Page_Loaded" xmlns:my="clr-namespace:University.Workshop.Presentation.ControlWPF"
      xmlns:ViewsConverter="clr-namespace:University.Workshop.Presentation.ViewsConverter">
    <Page.Resources>
        
            <ViewsConverter:BooleanToVisibility x:Key="boolToVis"/>
    </Page.Resources>
    <Grid>
        <Grid Height="563" Width="780"  
          HorizontalAlignment="Center" VerticalAlignment="Top">

        <Path Data="F1M89,500C86.791,500,85,501.791,85,504L85,504L85,538C85,540.209,86.791,542,89,542L89,542L1081,542C1083.209,542,1085,540.209,1085,538L1085,538L1085,504C1085,501.791,1083.209,500,1081,500L1081,500z" Height="50" Margin="20,0,12,459" Stretch="Fill" Stroke="#FFB6BDBA" VerticalAlignment="Bottom">
            <Path.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFF0F9F6" Offset="0" />
                    <GradientStop Color="sc#1, 0.8645034, 0.9386971, 0.9131128" Offset="0.036626586095394487" />
                    <GradientStop Color="sc#1, 0.849580646, 0.919979036, 0.8946999" Offset="0.046193367402403762" />
                    <GradientStop Color="sc#1, 0.8297841, 0.8951477, 0.8702733" Offset="0.052599494473647423" />
                    <GradientStop Color="sc#1, 0.8061086, 0.86545074, 0.8410604" Offset="0.057584354782454161" />
                    <GradientStop Color="sc#1, 0.7912979, 0.8468732, 0.822785735" Offset="0.059999998658895493" />
                    <GradientStop Color="#FFE6EDEA" Offset="0.059999998658895493" />
                    <GradientStop Color="#FFE6EDEA" Offset="1" />
                </LinearGradientBrush>
            </Path.Fill>
        </Path>
        <TextBlock FontSize="21" FontWeight="Bold" Margin="28,62,0,464" TextWrapping="Wrap" HorizontalAlignment="Left" Width="217"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Buscar Kardex" /></TextBlock>
        <Button Content="Buscar" Foreground="Black" Height="34" FontWeight="Bold" Margin="638,62,22,467" Name="SearchBtn" Click="SearchBtn_Click" />

            <Button Content="Buscar" Height="23" HorizontalAlignment="Center" Margin="598,142,112,0" Name="SearchIconBtn" VerticalAlignment="Top" Width="70" Click="SearchBtn_Click" Style="{StaticResource ButtonSearch}" />
            <DataGrid HeadersVisibility="None" 
                  AutoGenerateColumns="False"  
                  CanUserAddRows="False"
                  Height="298" 
                  HorizontalAlignment="Center"
                  Margin="111,167,111,0" 
                  Name="KardexFindeddtgv"
                  VerticalAlignment="Top" 
                  Width="557" >
            <DataGrid.Columns>
                <DataGridTemplateColumn Width="100" Header="C.I.">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                                <Label Height="32" VerticalContentAlignment="Center" Content="{Binding Person.PersonId}" Style="{StaticResource DataGridLabel}"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Width="100" Header="Nombre">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                                <Label Height="16" VerticalContentAlignment="Center" Content="{Binding Person.Names}" Style="{StaticResource DataGridLabel}"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Width="133" Header="Lote">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                                <Label Height="16" VerticalContentAlignment="Center" Content="{Binding Person.LastNames}" Style="{StaticResource DataGridLabel}"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Width="67" Header="Estado">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                                <Label Height="32" VerticalContentAlignment="Center" Content="{Binding EnableString}" Style="{StaticResource DataGridLabel}"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Acciones" Width="132">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Button Width="32" Height="32" ToolTip="Crear Reporte" Name="ReportKardex" Click="ReportKardex_Click">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/University.Workshop.Presentation;component/Resources/Icons/ReportIcon.ico" Stretch="Fill" TileMode="FlipXY" Viewport="0,0,32,32"  ViewportUnits="Absolute" />
                                        </Button.Background>
                                    </Button>
                                    <Button Width="32" Height="32" ToolTip="Mostrar" Name="ShowKardex" Click="ShowKardex_Click">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/University.Workshop.Presentation;component/Resources/Icons/file_find.ico" Stretch="Fill" TileMode="FlipXY" Viewport="0,0,32,32"  ViewportUnits="Absolute" />
                                        </Button.Background>
                                    </Button>
                                    <Button Width="32" Height="32" ToolTip="Habilitar" Name="EnableKardex" Click="EnableKardex_Click" Visibility="{Binding Path=VisibilityButtonEnable, Converter={StaticResource boolToVis}}">
                                    <Button.Background>
                                        <ImageBrush ImageSource="/University.Workshop.Presentation;component/Resources/Icons/file_apply.ico" />
                                    </Button.Background>
                                </Button>
                                <Button Width="32" Height="32" ToolTip="Inhabilitar" Name="DisableKardex" Visibility="{Binding Path=VisibilityButtonDisable, Converter={StaticResource boolToVis}}" Click="DisableKardex_Click">
                                    <Button.Background>
                                        <ImageBrush ImageSource="/University.Workshop.Presentation;component/Resources/Icons/file_del.ico" />
                                    </Button.Background>
                                </Button>
                                    <Button Width="32" Height="32" ToolTip="Modificar" IsEnabled="{Binding VisibilityButtonDisable}" Name="ModifyKardex" Click="ModifyKardex_Click" >
                                        <Button.Background>
                                            <ImageBrush ImageSource="/University.Workshop.Presentation;component/Resources/Icons/file_edit2.ico" />
                                        </Button.Background>
                                    </Button>
                                </StackPanel>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="447,141,0,0" SelectedIndex="1" Name="KardexStatedd" VerticalAlignment="Top" Width="67">
            <ComboBoxItem Content="Inactivo" />
            <ComboBoxItem Content="Activo" />
            <ComboBoxItem Content="Todos" />
        </ComboBox>
        <Rectangle Height="25" HorizontalAlignment="Left" Margin="112,114,0,0" Name="rectangle1" Stroke="Black" VerticalAlignment="Top" Width="556" Fill="#43000000" />
        <Label Content="C.I." HorizontalAlignment="Left" Margin="114,118,0,0" VerticalAlignment="Top" />
        <Label Content="Nombres" HorizontalAlignment="Left" Margin="217,118,0,0" VerticalAlignment="Top" />
        <Label Content="Apellidos" HorizontalAlignment="Left" Margin="318,118,0,0" VerticalAlignment="Top" />
        <Label Content="Estado" HorizontalAlignment="Left" Margin="447,118,0,0" VerticalAlignment="Top" />
            <my:NumericTextBox Height="24" MaxLength="9" Margin="112,141,569,0" x:Name="PersonIdRelativeTxBx" VerticalAlignment="Top" Style="{StaticResource NumericTextBox}" />
        <TextBox MaxLength="55"  Height="24" HorizontalAlignment="Left" Margin="214,141,0,0" Name="PersonNameRelativeTxbx" VerticalAlignment="Top" Width="97" />
        <TextBox MaxLength="80" Height="24" HorizontalAlignment="Left" Margin="314,141,0,0" Name="PersonLastNamesTxbx" VerticalAlignment="Top" Width="130" />
        
    </Grid>
        <Grid Name="Back1" Opacity="0.7" Background="Gray" Visibility="Hidden"></Grid>
        <Grid Name="BackDisable" Height="563" Width="780"  Visibility="Hidden"
          MaxHeight="563" MaxWidth="780" 
          MinHeight="563" MinWidth="780" 
          HorizontalAlignment="Center" VerticalAlignment="Top">
            <Grid Height="390" HorizontalAlignment="Center" Margin="130,41,113,0" Name="grid1" VerticalAlignment="Top" Width="538" Background="White">
                <TextBlock FontSize="21" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,23,0,397" TextWrapping="Wrap"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Inhabilitar Kardex" /></TextBlock>
                <Button Content="Cancelar" Height="43" HorizontalAlignment="Left" Margin="100,327,0,0" Name="button1" VerticalAlignment="Top" Width="127" FontSize="21" Background="#FF00D000" Click="button1_Click" />
                <Button Content="Inhabilitar" Height="43" HorizontalAlignment="Left" Margin="340,327,0,0" Name="button2" VerticalAlignment="Top" Width="127" FontSize="21" Background="#FFDC0000" Click="button2_Click" />
                <TextBlock FontSize="21" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,23,0,334" TextWrapping="Wrap"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Datos Personales" /></TextBlock>
            </Grid>
            <Label HorizontalAlignment="Left" Name="PersonCiTxt" Margin="357,166,0,0" VerticalAlignment="Top" />

            <Label Content="C.I.:" HorizontalAlignment="Left" Margin="323,166,0,0"  VerticalAlignment="Top" />
            <Label Content="Nombres:" HorizontalAlignment="Left" Margin="289,195,0,0" VerticalAlignment="Top" />
            <Label HorizontalAlignment="Left" Margin="357,195,0,0" Name="PersonNamesForDisableTxt" VerticalAlignment="Top"/>
            <Label Content="Apellidos:" HorizontalAlignment="Left" Margin="289,221,0,0" VerticalAlignment="Top" />
            <Label HorizontalAlignment="Left" Margin="357,221,0,0" Name="PersonLastNamesForDisableTxt" VerticalAlignment="Top"/>
            <TextBlock FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" TextWrapping="Wrap" Margin="0,119,0,411" ><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Datos Personales" /></TextBlock>
            <TextBlock FontSize="21" FontWeight="Bold" HorizontalAlignment="Center" Margin="-348,105,1016,425" TextWrapping="Wrap"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Datos Lote" /></TextBlock>
            <Label Content="Manzano:" HorizontalAlignment="Left" Margin="289,292,0,0" VerticalAlignment="Top" />
            <Label Content="Lote:" HorizontalAlignment="Left" Margin="315,318,0,0" VerticalAlignment="Top" />
            <Label HorizontalAlignment="Left" Margin="357,292,0,0" Name="PersonSquareForDisabelLbl" VerticalAlignment="Top" />
            <Label HorizontalAlignment="Left" Margin="357,318,0,0" Name="PersonAllotmentForDisableLbl" VerticalAlignment="Top" />
            <TextBlock FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,259,0,271" TextWrapping="Wrap"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Datos del Lote" /></TextBlock>
        </Grid>

        <Grid Name="BackReport" Height="563" Width="780"  Visibility="Hidden"
          MaxHeight="563" MaxWidth="780" 
          MinHeight="563" MinWidth="780" 
          HorizontalAlignment="Center" VerticalAlignment="Top">
            <Grid Height="334" HorizontalAlignment="Center" Margin="130,145,113,0"  VerticalAlignment="Top" Width="538" Background="White" Visibility="Visible">
                <TextBlock FontSize="21" FontWeight="Bold" HorizontalAlignment="Center"  TextWrapping="Wrap"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Crear Reporte" /></TextBlock>
                <Button Content="Cancelar" Height="43" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="127" FontSize="21" Background="#FF00D000"  Margin="110,277,0,0" Click="Button_Click_1" />
                <Button Content="Crear" Height="43" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="127" FontSize="21" Background="Blue"  Margin="258,277,0,0" Click="Button_Click" />
                <TextBlock FontSize="21" FontWeight="Bold" HorizontalAlignment="Center"  TextWrapping="Wrap" Margin="188,56,182,-56"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="270" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="Periodo Reporte" /></TextBlock>
                <Calendar Height="170" HorizontalAlignment="Left" Margin="188,82,0,0" Name="periodCalendar" VerticalAlignment="Top" Width="180" DisplayMode="Decade" Visibility="Visible" DisplayModeChanged="periodCalendar_DisplayModeChanged" PreviewMouseDoubleClick="periodCalendar_PreviewMouseDoubleClick" MouseDoubleClick="periodCalendar_PreviewMouseDoubleClick" />
            </Grid>
            <Label HorizontalAlignment="Left" Name="PeriodTxt" Margin="357,166,0,0" VerticalAlignment="Top" />

            
        </Grid>
    </Grid>
</Page>
